package ru.urfc.portal.ui.client.renderers;

import ru.urfc.portal.ui.client.descriptor.GridField;

import com.extjs.gxt.ui.client.data.ModelData;
import com.google.gwt.dom.client.Element;

public class TextRenderer extends SimpleRenderer {

	public TextRenderer(GridField field, Element element) {
		super(field, element);
	}
	
	@Override
	public String render(ModelData modelData) {
		return field.getValue(modelData);
	}
	
	@Override
	public void updateModel(ModelData modelData) {
		field.setValue(modelData, element.getInnerText());
	}
	
}
